package com.gupao.ldr.pattern.observer.guavaapi;

import com.google.common.eventbus.Subscribe;

import java.util.Observable;
import java.util.Observer;

public class Teacher {

    private String name;

    public Teacher(String name) {
        this.name = name;
    }

    @Subscribe
    public void update(Object obj) {
        Question question=(Question)obj;
        System.out.println("===========================");
        System.out.println(name+"老师，你好!\n"+
                "你收到一个来自 'GPer生态圈' 的提问，希望你解答，问题内容如下：\n"+
                question.getContent()+"\n"+
                "提问者:"+question.getUserName());
    }
}
